﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="ViewProviderCompany.aspx.cs" Inherits="Admin_provider_ViewProviderCompany"
    Title="View Provider Company" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>View Provider Company</h1>
                </td>
            </tr>
            <tr>
                <td>
                    Company Name : 
                    <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox> 
                    <asp:Button ID="btnSearch" runat="server" Text="Search" />
                </td>
                <td width="30%" align="right" style="text-align:right;">
                    <asp:Button ID="btnNewCompany" runat="server" OnClick="btnNewCompany_Click" Text="New Company" />
                </td>
            </tr>
            
            <tr>
                <td colspan="2">
                    <asp:GridView ID="grvProviderCompany" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" Cellspacing="3" CellPadding="3" Width="100%" PagerStyle-CssClass="pgr" CssClass="admin_gridstyle" DataKeyNames="ProviderCompanyId"
                        DataSourceID="sqlDSProviderCompany" GridLines="None" OnSelectedIndexChanged="grvProviderCompany_SelectedIndexChanged">
                        <Columns>
                            <asp:BoundField DataField="ProviderCompanyId" HeaderText="ProviderCompanyId" InsertVisible="False"
                                ReadOnly="True" SortExpression="ProviderCompanyId" Visible="False" />
                            <asp:BoundField DataField="CompanyName" ItemStyle-Width="250px" 
                                HeaderText="Company Name" SortExpression="CompanyName" >
<ItemStyle Width="250px"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="BusInsType" 
                                HeaderText="BusInsType" SortExpression="BusInsType" Visible="False" />
                            <asp:BoundField DataField="CompanyType" ItemStyle-Width="200px" 
                                HeaderText="CompanyType" SortExpression="CompanyType" Visible="False" >
<ItemStyle Width="200px"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="PhoneNo1" HeaderText="Phone No.1" 
                                SortExpression="PhoneNo1" />
                            <asp:BoundField DataField="PhoneNo2" HeaderText="PhoneNo2" 
                                SortExpression="PhoneNo2" Visible="False" />
                            <asp:BoundField DataField="FaxNo1" HeaderText="FaxNo1" SortExpression="FaxNo1" 
                                Visible="False" />
                            <asp:BoundField DataField="FaxNo2" HeaderText="FaxNo2" SortExpression="FaxNo2" 
                                Visible="False" />
                            <asp:BoundField DataField="Email1" HeaderText="Email 1" 
                                SortExpression="Email1" />
                            <asp:BoundField DataField="Email2" HeaderText="Email2" 
                                SortExpression="Email2" Visible="False"/>
                            <asp:BoundField DataField="URL1" HeaderText="URL1" SortExpression="URL1" Visible="False"/>
                            <asp:BoundField DataField="URL2" HeaderText="URL2" SortExpression="URL2" 
                                Visible="False" />
                            <asp:BoundField DataField="PostCode" HeaderText="PostCode" 
                                SortExpression="PostCode" />
                            <asp:BoundField DataField="UnitNo1" HeaderText="UnitNo1" 
                                SortExpression="UnitNo1" Visible="False"/>
                            <asp:BoundField DataField="UnitNo2" HeaderText="UnitNo2" 
                                SortExpression="UnitNo2" Visible="False"/>
                            <asp:BoundField DataField="Street" HeaderText="Street" 
                                SortExpression="Street" Visible="False"/>
                            <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                            <asp:BoundField DataField="Country" HeaderText="Country" 
                                SortExpression="Country" Visible="False"/>
                            <asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status" 
                                Visible="False" />
                            <asp:BoundField DataField="CompanyColorCode1" HeaderText="CompanyColorCode1" 
                                SortExpression="CompanyColorCode1" Visible="False" />
                            <asp:BoundField DataField="CompanyColorCode2" HeaderText="CompanyColorCode2" 
                                SortExpression="CompanyColorCode2" Visible="False" />
                            <asp:BoundField DataField="CompanyColorCodeRGB" 
                                HeaderText="CompanyColorCodeRGB" SortExpression="CompanyColorCodeRGB" 
                                Visible="False" />
                            <asp:BoundField DataField="RefCEUserId" HeaderText="RefCEUserId" 
                                SortExpression="RefCEUserId" Visible="False" />
                            <asp:BoundField DataField="CreatedDate" HeaderText="CreatedDate" 
                                SortExpression="CreatedDate" Visible="False" />
                            <asp:BoundField DataField="ModifiedDate" HeaderText="ModifiedDate" 
                                SortExpression="ModifiedDate" />
                            <asp:CommandField ShowSelectButton="True" HeaderText ="Detail"/>
                        </Columns>
                        <FooterStyle />
                        <PagerStyle />
                        <SelectedRowStyle />
                        <HeaderStyle CssClass="admin_gridheader" />
                        <EditRowStyle />
                        <AlternatingRowStyle CssClass="admin_gridodd" />
                        <RowStyle CssClass="admin_grideven" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqlDSProviderCompany" runat="server" ConnectionString="<%$ ConnectionStrings:TH.CX_DBConnectionString %>"
                        SelectCommand="sprocProviderCompanySelectItemList" 
                        SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="txtCompanyName" Name="CompanyName" PropertyName="Text"
                                Type="String" DefaultValue="%" ConvertEmptyStringToNull="false" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
